package com.shchuangzhi.smartguard.core;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by j_hu on 5/10/17.
 */

public class School {

    private String id;
    private String name;
    private DBHelper dbHelper;

    public School(DBHelper dbHelper) {
        this.dbHelper = dbHelper;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public boolean reset() {
        return dbHelper.resetSchool(this);
    }

    public List<Grade> getAllGrades() {
        return dbHelper.getAllGrades();
    }

    public Grade getGrade(Integer no) {
        return dbHelper.getGradeByNo(no);
    }
}
